(function (){
	var w = document.documentElement.clientWidth, 
		h = document.documentElement.clientHeight,
		k=1334/750;
	if (h < w) {//横屏
		document.documentElement.style.fontSize = w / 1334 * 100 + "px";
	}
	else {//竖屏
		document.documentElement.style.fontSize = w / 750 * 100 + "px";
	}
})();
(function (){
	var k=1334/750;//设计稿宽高比
    function orientationfn() {
        setTimeout(function () {
            var html = document.documentElement;
            var w = document.documentElement.clientWidth, h = document.documentElement.clientHeight;
            if (h < w) {//横屏
                if (w / h <= k) {
                    html.style.fontSize = h / 750 * 100 + "px";
                } else {
                    html.style.fontSize = w / 1334 * 100 + "px";
                }
            }
            else {//竖屏
                if (h / w <= k) {
                    html.style.fontSize = w / 750 * 100 + "px";

                } else {
                    html.style.fontSize = h / 1334 * 100 + "px";
                }
            }
        }, 200);
    }
    window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", orientationfn, false);
    orientationfn();
})();